package pl.com.kyhu.dietex3000.utils;

import java.util.Random;

public class Rand {
	protected final static Random rand = new Random();
	private static final Integer PROB_RANGE = 1000;
	static {
		rand.setSeed(System.currentTimeMillis());

	}

	public static Integer nextInt(Integer n) {
		if (n == 0) return 0;
		return rand.nextInt(n);
	}

	public static Integer nextProb() {
		return rand.nextInt(PROB_RANGE);
	}

	public static boolean nextBool() {
		return rand.nextBoolean();
	}

	public static void setSeed(Long seed) {
		rand.setSeed(seed);
	}

	public static Float nextFloat() {
		return rand.nextFloat();
	}

	public static float nextGaussian() {
		return (float) rand.nextGaussian();
	}
}
